#include "list.h"
#include <iostream>
#include <exception>
#include <vector>
#include <map>
#include <queue>
#include <functional>
#include <memory>
#include <assert.h>
#include <string>
#include <unordered_map>
#include <variant>

int main(int argc, char ** argv) {
	try {
		list<int> input;
		input.push_front(1);
		input.push_front(2);
		input.push_front(3);

		input.pop_front();
		input.pop_back();

		input.push_back(-1);
		input.push_back(5);

		input.emplace_front(7);
		input.emplace_back(6);

		std::cout << input.front() << std::endl;
		std::cout << input.back() << std::endl;
		std::cout << "input.size: " << input.size() << std::endl;

		std::cout << *input.begin() << std::endl;

		//std::cout << *(++input.begin()) << std::endl;
		//auto it = input.begin();
		//std::cout << *(it++) << std::endl;
		//list<int> subinput;
		//subinput.push_back(9);
		//subinput.push_back(10);
		//subinput.push_back(11);
		//subinput.push_back(12);

		//input.merge(subinput);

		//std::cout << input.front() << std::endl;
		//std::cout << input.back() << std::endl;
		////only test
		//for (int i = 0; i < input.size(); ++i) {
		//	std::cout << input[i] << std::endl;
		//}
	}
	catch (const std::exception& e) {
		std::cout << e.what() << std::endl;
	}


	return 0;
}
